package br.com.hhc.sample.fullstackspringhibernate.database.data.domain;

// Generated 18/03/2015 07:46:00 by Hibernate Tools 4.3.1

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * StudentClasses generated by hbm2java
 */
@Entity
@Table(name = "STUDENT_CLASSES")
public class StudentClasses implements java.io.Serializable {
	
	private static final long serialVersionUID = 1L;

	private StudentClassesId id;
	private Classes classes;
	private Student student;
	private Date beginDate;
	private Date endDate;
	private Integer scoreGrade;

	public StudentClasses() {
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "studentId", column = @Column(name = "STUDENT_ID", nullable = false, precision = 5, scale = 0)),
			@AttributeOverride(name = "classesId", column = @Column(name = "CLASSES_ID", nullable = false, precision = 4, scale = 0)),
			@AttributeOverride(name = "status", column = @Column(name = "STU_CLASSES_STATUS", nullable = false, length = 1)) })
	
	public StudentClassesId getId() {
		return this.id;
	}

	public void setId(StudentClassesId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CLASSES_ID", nullable = false, insertable = false, updatable = false)
	public Classes getClasses() {
		return this.classes;
	}

	public void setClasses(Classes classes) {
		this.classes = classes;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STUDENT_ID", nullable = false, insertable = false, updatable = false)
	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "STU_CLASSES_BEGIN_DATE", nullable = false, length = 7)
	public Date getStuClassesBeginDate() {
		return this.beginDate;
	}

	public void setStuClassesBeginDate(Date stuClassesBeginDate) {
		this.beginDate = stuClassesBeginDate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "STU_CLASSES_END_DATE", length = 7)
	public Date getStuClassesEndDate() {
		return this.endDate;
	}

	public void setStuClassesEndDate(Date stuClassesEndDate) {
		this.endDate = stuClassesEndDate;
	}

	@Column(name = "STU_CLASSES_SCORE_GRADE", nullable = false, precision = 3, scale = 0)
	public Integer getStuClassesScoreGrade() {
		return this.scoreGrade;
	}

	public void setStuClassesScoreGrade(Integer stuClassesScoreGrade) {
		this.scoreGrade = stuClassesScoreGrade;
	}

}
